package com.yuan.springcloud.order.feign;

import com.yuan.springcloud.order.entity.Product;
import org.springframework.stereotype.Component;

/**
 * Product微服务降级方法
 * @author YouYuan
 * @version 1.0
 * @date 2020/3/31 18:18
 */
@Component
public class ProductFeignClientFallback implements ProductFeignClient {
    @Override
    public Product findById(Long id) {
        Product product = new Product();
        product.setProductName("抱歉，服务异常触发降级方法");
        return product;
    }

    @Override
    public String msg(String msg) {
        return "抱歉，服务异常触发降级方法,msg:" + msg;
    }
}
